import request from '@/utils/request' 
export default{
    //1.讲师列表(条件查询分页)
    //current当前页  limit每页记录数  teacherQuery条件对象
    getTeacherListPage(current,limit,teacherQuery){
        return request({
            url:`/eduservice/edu-teacher/pageTeacherCondition/${current}/${limit}`,
            method:'post',
            //teacherQuery条件对象，后端使用请求体获取数据
            //data表示把对象转换json格式传递到接口中
            data:teacherQuery
        })
    },
    //根据id删除老师的方法
    deleteTeacherId(id){
        return request({
            url:`/eduservice/edu-teacher/deleteTeacher/${id}`,
            method:'delete'
        })
    },
    //添加老师信息的方法
    addTeacher(teacher){
        return request({
            url:`/eduservice/edu-teacher/addTeacher`,
            method:'post',
            data:teacher
        })
    },
     //根据id获取老师信息的方法
     getTeacherInfo(id){
        return request({
            url:`/eduservice/edu-teacher/findTeacherById/${id}`,
            method:'post'
        })
    },
     //修改老师信息的方法
     updateTeacherInfo(teacher){
        return request({
            url:`/eduservice/edu-teacher/updateTeacherById`,
            method:'post',
            data:teacher
        })
    },
}